package com.xiaoxu.rental.entity;

import com.alibaba.fastjson2.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 *
 * @TableName busi_maintain
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("busi_maintain")
@ApiModel(value = "Maintain对象", description = "")
public class Maintain implements Serializable {
    /**
     * 保养id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 车辆id
     */
    private Integer autoId;

    /**
     * 车牌号码
     */
    private String autoNum;

    /**
     * 维保时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime maintainTime;

    /**
     * 维保地点
     */
    private String location;

    /**
     * 维保项目
     */
    private String item;

    /**
     * 维保费用
     */
    private Integer cost;

    /**
     * 创建时间
     */
    @TableField(fill= FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 是否删除
     */
    private Integer deleted;


    @TableField(exist = false)
    private Integer lowCost;
    @TableField(exist =false)
    private Integer highCost;
    @TableField(exist =false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime lowMaintainTime;
    @TableField(exist =false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime highMaintainTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

}
